<template>
  <!--维修工单视图-->
  <div style="background-color: #E9EEF3;">
    <el-row>
      <el-col :span="18" :offset="3" style="color: #333333">
        <el-row style="background:#ffffff;padding:0 20px">
          <el-col :span="24">
            <div class="dialog__header">
              <span class="dialog__title">维修工单</span>
            </div>
          </el-col>
        </el-row>
        <el-row style="background:#ffffff;padding:0 20px">
          <el-form :model="Maintenance" label-width="100px" :rules="rules">
            <el-divider><span class="font-14-bold">单号与接件</span></el-divider>
            <el-row>
              <el-col :span="12">
                <el-form-item label="工单主题:" prop="name" style="width: 370px">
                  <el-input v-model="maintenance.maiNo"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="接单人:" style="width: 370px">
                  <el-input :disabled="true" v-model="maintenance.employeeByEmpId.empName"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="接件日期:" style="width: 370px">
                  <el-date-picker type="date" v-model="maintenance.maiDate" placeholder="选择日期" style="width: 270px"></el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="分类:" style="width: 370px">
                  <el-select v-model="maintenance.maiConnectorClassify" placeholder="未选" style="width: 270px">
                    <el-option v-for="item in gdFenlei" :key="item.value"
                               :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="客户:" style="width: 370px">
                  <el-input :disabled="true" v-model="maintenance.customerByCustomerId.customerName" ></el-input>
                </el-form-item>
                <div class="form-inline" v-show="isCustomer">
                  <el-input v-model="customerValue" @input="findCustomer" clearable size="medium" placeholder="拼音.字母.关键字" style="width: 150px"></el-input>
                  <el-button @click="findCustomer" size="medium" icon="el-icon-search"></el-button>
                  <el-popover placement="top" width="140" v-model="visible">
                    <ul class="cu-ul" v-if="customerList2 != ''">
                      <li @click="choiceCustomer2(item)" v-for="item in customerList2">{{item.customerName}}</li>
                    </ul>
                    <div style="color: #5d9cec;margin: 5px 0;text-align: center" v-if="customerList2 == ''"><i class="el-icon-warning-outline"/>没有该客户！</div>
                  </el-popover>
                  <el-tooltip class="item" effect="dark" content="浏览选择客户" placement="bottom">
                    <el-button @click="innerVisible(cusCurrPage,cusPageSize)" size="medium" icon="el-icon-s-operation"></el-button>
                  </el-tooltip>
                </div>
              </el-col>
              <el-col :span="12">
                <el-form-item  label="联系人:" style="width: 370px">
                  <el-select v-model="maintenance.maiContactName" placeholder="未选" style="width: 270px">
                    <el-option v-for="(item,index) in contactList" :key="index" :label="item.contactName" :value="item.contactName">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider><span class="font-14-bold">接件详情</span></el-divider>
            <el-row>
              <el-col :span="12">
                <el-form-item label="维修产品:" style="width: 370px">
                  <el-input v-model="maintenance.maiProductName"></el-input>
                </el-form-item>
                <div class="form-inline">
                  <el-input size="medium" placeholder="拼音.字母.关键字" style="width: 150px"></el-input>
                  <el-button size="medium" icon="el-icon-search"></el-button>
                  <el-tooltip class="item" effect="dark" content="浏览选择产品" placement="bottom">
                    <el-button @click="innerVisible2(proCurrPage,proPageSize)"  size="medium" icon="el-icon-s-operation"></el-button>
                  </el-tooltip>
                </div>
              </el-col>
              <el-col :span="12">
                <el-form-item label="承接部门:" style="width: 370px">
                  <el-select value-key="deptId" v-model="maintenance.departmentByDeptId" placeholder="未选" style="width: 270px">
                    <el-option v-for="item in deptList" :key="item.deptId"
                               :label="item.deptName" :value="item"  >
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="故障描述:" style="width: 370px">
                  <el-input type="textarea" v-model="maintenance.maiFaultDescription" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="注意事项:" style="width: 370px">
                  <el-input type="textarea" v-model="maintenance.maiPoints" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="状态:" style="width: 370px">
                  <el-select v-model="maintenance.maiExecuteState" placeholder="未选" style="width: 270px">
                    <el-option v-for="item in state" :key="item.value"
                               :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider><span class="font-14-bold">费用与执行</span></el-divider>
            <el-row>
              <el-col :span="12">
                <el-form-item label="费用:"  style="width: 370px">
                  <el-input v-model="maintenance.maiCost" placeholder="￥0.00"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="已收款:" style="width: 370px">
                  <el-input v-model="maintenance.maiReceivable" placeholder="￥0.00" style="width: 270px"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="进度:" style="width: 390px">
                  <el-radio-group v-model="radio1">
                    <el-radio :label=1>执行中</el-radio>
                    <el-radio :label=2>结束</el-radio>
                    <el-radio :label=3>意外中止</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="交付日期:" style="width: 370px">
                  <el-date-picker v-model="maintenance.maiDeliverDate" type="date" placeholder="选择日期" style="width: 270px"></el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="备注:"  style="width: 370px">
                  <el-input v-model="maintenance.maiRemarks" type="textarea" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12" :offset="7">
                <el-form-item>
                  <el-button type="primary" @click="addMaintenance()">保存</el-button>
                  <el-button>取消</el-button>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
          <!--内层dialog-->
          <el-dialog width="30%" title="全部客户" :visible.sync="innerDialog" append-to-body>
            <!--选择客户-->
            <el-table :data="customerList" style="width: 100%">
              <el-table-column prop="customerId" label="客户编号" >
              </el-table-column>
              <el-table-column prop="customerName" label="客户名" >
              </el-table-column>
              <el-table-column label="请选择" >
                <template slot-scope="scope">
                  <el-button size="mini" @click="choiceCustomer(scope.row)" icon="el-icon-check" type="primary" circle style="margin-left: 10px"></el-button>
                </template>
              </el-table-column>
            </el-table>
            <el-row style="margin-top:10px">
              <el-col :span="16">
                <el-pagination layout="prev, pager, next, jumper" :total="cusTotalSize" @current-change="cusChangePage"
                               :current-page.sync="cusCurrPage" :page-size="cusPageSize"></el-pagination>
              </el-col>
            </el-row>
          </el-dialog>
          <!--内层dialog2-->
          <el-dialog width="30%" title="全部产品" :visible.sync="innerDialog2" append-to-body>
            <!--选择产品-->
            <el-table :data="productList" style="width: 100%">
              <el-table-column prop="productId" label="产品编号" >
              </el-table-column>
              <el-table-column prop="productName" label="产品名" >
              </el-table-column>
              <el-table-column label="请选择" >
                <template slot-scope="scope">
                  <el-button size="mini" @click="choiceProduct(scope.row)" icon="el-icon-check" type="primary" circle style="margin-left: 10px"></el-button>
                </template>
              </el-table-column>
            </el-table>
            <el-row style="margin-top:10px">
              <el-col :span="16">
                <el-pagination layout="prev, pager, next, jumper" :total="proTotalSize" @current-change="proChangePage"
                               :current-page.sync="proCurrPage" :page-size="proPageSize"></el-pagination>
              </el-col>
            </el-row>
          </el-dialog>
        </el-row>
        <el-row>
          <el-col :span="24">
            <p class="f-s-12" @click="dialog1=true">方式一：<b>只记录费用和配件明细</b><font color="#808080"></font></p>
          </el-col>
        </el-row>
      </el-col>
    </el-row>
    <el-row>
      <!--待办任务dialog-->
      <!--<el-dialog title="待办任务" :visible.sync="dialog1" width="60%" style="color: #333333"  >
        <el-form  label-width="100px" :rules="rules">
          <el-divider><span class="font-14-bold"></span></el-divider>
          <el-row>
            <el-col :span="24">
              <el-form-item label="行动描述:" style="width: 806px">
                <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" ></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="执行人:" style="width: 806px">
                <el-input>
                  <el-button slot="append" icon="el-icon-search" ></el-button>
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="完成期限:" style="width: 806px">
                <el-date-picker  type="date" placeholder="选择日期" style="width: 270px"></el-date-picker>
                <el-button size="medium">明天</el-button>
                <el-button size="medium">后天</el-button>
                <el-button size="medium">一周后</el-button>
                <el-button size="medium">一个月后</el-button>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="16">
              <el-form-item label="时间:" style="width: 806px">
                <el-time-picker :picker-options="{selectableRange: '18:30:00 - 20:30:00'}"
                                placeholder="任意时间点">
                </el-time-picker>
                <el-button size="medium">上午</el-button>
                <el-button size="medium">下午</el-button>
              </el-form-item>
            </el-col>
            <el-col :span="8" style="line-height: 40px">
              <span>优先:</span>
              <el-radio-group v-model="radio">
                <el-radio :label="1">高</el-radio>
                <el-radio :label="2">低</el-radio>
              </el-radio-group>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="客户:" style="width: 807px">
                <el-input ></el-input>
              </el-form-item>
            </el-col>
            <div class="form-inline">
              <el-input size="medium" placeholder="拼音.字母.关键字" style="width: 150px"></el-input>
              <el-button size="medium" icon="el-icon-search"></el-button>
              <el-tooltip class="item" effect="dark" content="浏览选择客户" placement="bottom">
                <el-button size="medium" icon="el-icon-s-operation"></el-button>
              </el-tooltip>
            </div>
          </el-row>
          <el-row>
            <el-col :span="12" style="line-height: 40px">
              <el-form-item label="联系人:" style="width: 370px">
                <el-select placeholder="未选" style="width: 270px"></el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <span>状态:</span>
              <el-radio-group v-model="radio">
                <el-radio :label="1">未结束</el-radio>
                <el-radio :label="2">已结算</el-radio>
                <el-radio :label="2">取消</el-radio>
              </el-radio-group>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="创建人:" style="width: 370px">
                <el-input></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="创建时间:" style="width: 370px">
                <el-input></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12" :offset="7">
              <el-form-item>
                <el-button type="primary">保存</el-button>
                <el-button @click="dialogFormVisible = false">取消</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </el-dialog>
     -->
      <el-dialog :visible.sync="dialog1">
        <el-form :model="Maintenance" label-width="100px" :rules="rules">
          <el-divider><span class="font-14-bold">$费用&维修配件服务明细</span></el-divider>
          <el-row>
            <el-col :span="18">
              <el-form-item label="收费/回款记录" label-width="200px">
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item>
                <span @click="dialog3=true" style="margin-right: 0px">+</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="18">
              <el-form-item label="开票记录" label-width="200px">
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item>
                <span @click="dialog4=true" style="margin-right: 0px">+</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="18">
              <el-form-item label="维修配件及服务明细:" label-width="200px">
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item>
                <span @click="dialog2=true" style="margin-right: 0px">编辑明细</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-table :data="product" style="width: 100%">
                <el-table-column prop="ProductName" label="品名" >
                </el-table-column>
                <el-table-column prop="productModel" label="型号" >
                </el-table-column>
                <el-table-column prop="proCount" label="数量" >
                </el-table-column>
                <el-table-column prop="productPrice" label="单价" >
                </el-table-column>
                <el-table-column prop="money" label="金额" >
                </el-table-column>
                <el-table-column label="合计" min-width="210">
              </el-table-column>
                <el-table-column label="总计（大写金额）" min-width="210">
                </el-table-column>
              </el-table>
            </el-col>
          </el-row>
        </el-form>
      </el-dialog>
      <el-dialog :visible.sync="dialog2">
        <el-form :model="Maintenance" label-width="100px" :rules="rules">
          <el-divider><span class="font-14-bold">$费用&维修配件服务明细</span></el-divider>
          <el-row>
            <el-col :span="18">
              <el-form-item label="收费/回款记录" label-width="200px">
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item>
                <span @click="dialog2=true" style="margin-right: 0px">+</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="18">
              <el-form-item label="开票记录" label-width="200px">
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item>
                <span @click="dialog2=true" style="margin-right: 0px">+</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="18">
              <el-form-item label="维修配件及服务明细:" label-width="200px">
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item>
                <span @click="dialog2=true" style="margin-right: 0px">编辑明细</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-table :data="product" style="width: 100%">
                <el-table-column prop="ProductName" label="品名" >
                </el-table-column>
                <el-table-column prop="productModel" label="型号" >
                </el-table-column>
                <el-table-column prop="proCount" label="数量" >
                </el-table-column>
                <el-table-column prop="productPrice" label="单价" >
                </el-table-column>
                <el-table-column prop="money" label="金额" >
                </el-table-column>
                <el-table-column label="合计" min-width="210">
                </el-table-column>
                <el-table-column label="总计（大写金额）" min-width="210">
                </el-table-column>
              </el-table>
            </el-col>
          </el-row>
        </el-form>
      </el-dialog>
    </el-row>
  </div>
</template>

<script>export default {
  data () {
    return {
      type: '',
      search: '',
      radio1: 1,
      customerList: [], // 员工客户名称
      productList: [], // 产品名称
      contactList: [], // 联系人集合
      cusPageSize: 2, // 分页页大小
      cusCurrPage: 1, // 当前页码，默认为1
      cusTotalSize: 0, // 总记录数
      proPageSize: 2, // 分页页大小
      proCurrPage: 1, // 当前页码，默认为1
      proTotalSize: 0, // 总记录数
      isCustomer: true, // 客户搜索显示
      isProduct: true, // 产品搜索显示
      innerDialog: false, // 内层dialog客户
      innerDialog2: false, // 内层dialog部门
      innerDialogEmp: false, // 内层dialog员工
      customerValue: '', // 模糊查询客户
      customerList2: [], // 模糊查询结果
      visible: false, // 模糊搜索结果
      maintenance: {
        maiId: 0,
        maiDate: '',
        maiConnectorClassify: '',
        maiFaultDescription: '',
        maiPoints: '',
        maiSchedule: '',
        maiCost: '',
        maiReceivable: '',
        maiExecuteState: '',
        maiDeliverDate: '',
        maiRemarks: '',
        maiContactName: '',
        maiProductName: '',
        maiNo: '',
        employeeByEmpId: '',
        departmentByDeptId: '',
        customerByCustomerId: ''
      },
      AllOptions: [{
        value: 0,
        label: '全部数据'},
      {
        value: 1,
        label: '接件'},
      {
        value: 2,
        label: '待检测'},
      {
        value: 3,
        label: '待与客户确认'},
      {
        value: 4,
        label: '待维修'},
      {
        value: 5,
        label: '待沟通'},
      {
        value: 6,
        label: '维修中'},
      {
        value: 7,
        label: '待交付'},
      {
        value: 8,
        label: '已交付'}],
      state: [
        {
          value: 1,
          label: '接件'},
        {
          value: 2,
          label: '待检测'},
        {
          value: 3,
          label: '待与客户确认'},
        {
          value: 4,
          label: '待维修'},
        {
          value: 5,
          label: '待沟通'},
        {
          value: 6,
          label: '维修中'},
        {
          value: 7,
          label: '待交付'},
        {
          value: 8,
          label: '已交付'}],
      dialogFormVisible: false,
      gdFenlei: [{
        value: 1,
        label: '产品销售'
      }, {
        value: 2,
        label: '服务'
      }, {
        value: 3,
        label: '业务合作'
      }, {
        value: 4,
        label: '代理分销'
      }, {
        value: 5,
        label: '其他'
      }],
      deptList: [],
      product: {
        productId: 0,
        productCost: '',
        productModel: '',
        productName: '',
        productPrice: ''
      },
      proCount: '',
      money: '',
      deptValue: '',
      radio: '1',
      direction: 'rtl',
      rules: {
        name: [
          { required: true, message: '请输入活动名称', trigger: 'blur' },
          { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
        ]},
      mulSelection: [],
      dialog1: false,
      dialog2: false,
      dialog3: false,
      dialog4: false,
      dialog5: false,
      dialog6: false,
      dialog7: false
    }
  },
  methods: {
    // 查询机会
    initData () {
      let maiId = this.$route.query.maiId
      this.$axios.get('http://localhost:8088/maintenance-selectOne', {
        params: {
          maiId: maiId
        }
      })
        .then(v => {
          this.maintenance = v.data
          this.choiceContact()
        })
        .catch(function (v) {})
    },
    addMaintenance () {
      this.maintenance.maiSchedule = this.radio1
      // eslint-disable-next-line no-undef
      this.$axios.post('http://localhost:8088/maintenance-addMaintenance', this.maintenance)
        .then(v => {
          // 1、刷新数据
          this.initData(this.currPage, this.pageSize)
          // 2、关闭弹框
          this.dialogFormVisible = false
          // 3、重新初始化表单数据模型
          this.maintenance = {
            maiId: 0,
            maiDate: '',
            maiConnectorClassify: '',
            maiFaultDescription: '',
            maiPoints: '',
            maiSchedule: '',
            maiCost: '',
            maiReceivable: '',
            maiExecuteState: '',
            maiDeliverDate: '',
            maiRemarks: '',
            maiContactName: '',
            maiProductName: '',
            maiNo: '',
            employeeByEmpId: '',
            departmentByDeptId: '',
            customerByCustomerId: ''
          }
        })
        .catch(function (v) {})
    },
    // 打开内层dialog
    innerVisible (cusCurrPage, cusPageSize) {
      this.$axios.get('http://localhost:8088/emp-customer-list', {
        params: {
          page: cusCurrPage,
          size: cusPageSize,
          empId: this.emp.empId
        }
      })
        .then(v => {
          this.customerList = v.data.rows
          this.cusTotalSize = v.data.total
        })
        .catch(function (v) {})
      this.innerDialog = true
    },
    // 打开内层dialog
    innerVisible2 (proCurrPage, proPageSize) {
      this.$axios.get('http://localhost:8088/product-list', {
        params: {
          page: proCurrPage,
          size: proPageSize
        }
      })
        .then(v => {
          this.productList = v.data.rows
          this.proTotalSize = v.data.total
        })
        .catch(function (v) {})
      this.innerDialog2 = true
    },
    // 客户分页
    cusChangePage (val) {
      // val就是当前页码
      this.innerVisible(val, this.cusPageSize)
    },
    // 产品分页
    proChangePage (val) {
      // val就是当前页码
      this.innerVisible2(val, this.proPageSize)
    },
    // 选择客户
    choiceCustomer (val) {
      this.maintenance.customerByCustomerId = val
      console.log(this.maintenance.customerByCustomerId)
      this.choiceContact(val.customerId)
      this.innerDialog = false
    },
    // 选择产品
    choiceProduct (val) {
      this.maintenance.maiProductName = val.productName
      this.innerDialog2 = false
    },
    // 选择联系人
    choiceContact (customerId) {
      this.$axios.get('http://localhost:8088/contact-list', {
        params: {
          customerId: customerId
        }
      })
        .then(v => {
          this.contactList = v.data
        })
        .catch(function (v) {})
    },
    // 模糊查询客户
    findCustomer () {
      // eslint-disable-next-line eqeqeq
      if (this.customerValue != '') {
        this.visible = true
        this.$axios.get('http://localhost:8088/emp-fuzzy-customer-list', {
          params: {
            customerName: this.customerValue
          }
        })
          .then(v => {
            this.customerList2 = v.data
          })
          .catch(function (v) {})
      } else {
        this.visible = false
      }
    },
    // 模糊选择客户
    choiceCustomer2 (val) {
      console.log(val)
      this.maintenance.customerByCustomerId = val
      this.choiceContact(val.customerId)
      this.visible = false
    },
    openView (val) {
      this.$axios.post('http://localhost:8080/#/maintenanceview')
    },
    handleDelete (val) {
      this.$confirm('此操作将永久删除销售机会, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        console.log(val['id'])
        this.$axios.post('http://localhost:8080/save-emp', this.qs.stringify(val['id']))
        this.$message({
          type: 'success',
          message: '删除成功!'
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    getMoney () {

    },
    getTotal () {

    },
    handleDeleteMany () {
      this.$confirm('此操作将永久删除勾选销售机会, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.deleteAll()
        this.$message({
          type: 'success',
          message: '删除成功!'
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    handleSelectionChange (val) {
      this.mulSelection = val
    },
    deleteAll () {
      this.mulSelection.forEach(row => {
        console.log(row)
        this.$axios.post('http://localhost:8080/#/maintenanceview', this.maintenance.stringify(row))
      })
    }
  },
  created: function () {
    this.initData(this.maiId)
    this.$axios.get('http://localhost:8088/dept-all-list')
      .then(v => {
        this.deptList = v.data
      })
      .catch(function (v) {})
  }
}
</script>

<style>
  .dialog__title {
    line-height: 24px;
    font-size: 18px;
    color: #303133;

  }
  .dialog__header{
    padding: 20px 20px 40px;
  }
  .font-14-bold{
    color: #000000;
    font-weight: bold;
  }
  .cursor{
    cursor: pointer;
  }
</style>
